package ferp.android.widgets.buttons;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.Button;
import android.widget.ToggleButton;
import ferp.android.R;

/**
 * Created by Oleg on 21/04/2015.
 */
public class ToggleTextButton extends TextButton
{
  public ToggleTextButton(Context context) {this(context, null, 0);}
  public ToggleTextButton(Context context, AttributeSet attrs) {this(context, attrs, 0);}
  public ToggleTextButton(Context context, AttributeSet attrs, int defStyle) {super(context, attrs, defStyle);}

  public void setChecked(boolean checked) {((ToggleButton)button).setChecked(checked);}

  @Override
  protected Button onCreateButton(Context context)
  {
    ToggleButton tb = new ToggleButton(context);

    tb.setText("");
    tb.setTextOn("");
    tb.setTextOff("");

    return tb;
  }
}
